package com.lagou.edu.service;

import com.lagou.edu.pojo.LagouAuthCode;
import com.lagou.edu.pojo.Result;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author 梅松
 * @Date 2021/10/19 16:45
 */
public interface CodeService {
    Boolean isEmailExist(String email);

    Boolean isExipired(LagouAuthCode code);

    @Transactional
    Long saveCode(String code, String email);

    LagouAuthCode findCodeByEmail(String email);

    Result checkCode(String email, String code);

    Result deleteCode(String email);
}
